Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

snakeize

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

snakeize

recursively transform key strings from camel-case to underscore-style

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
147K
decreased by-50.57%
Maintainers
1
Weekly downloads
 
Created

What is snakeize?

The snakeize npm package is used to convert object keys to snake_case. This is particularly useful when working with APIs or databases that follow the snake_case naming convention.

What are snakeize's main functionalities?

Convert object keys to snake_case

This feature allows you to convert the keys of an object from camelCase or other formats to snake_case.

const snakeize = require('snakeize');
const input = { firstName: 'John', lastName: 'Doe' };
const output = snakeize(input);
console.log(output); // { first_name: 'John', last_name: 'Doe' }

Nested object key conversion

This feature allows you to convert the keys of nested objects to snake_case.

const snakeize = require('snakeize');
const input = { user: { firstName: 'John', lastName: 'Doe' }, age: 30 };
const output = snakeize(input);
console.log(output); // { user: { first_name: 'John', last_name: 'Doe' }, age: 30 }

Other packages similar to snakeize

Keywords

FAQs

Package last updated on 13 May 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc